﻿<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:Avanade="urn:Avanade" xmlns:rs='urn:schemas-microsoft-com:rowset' xmlns:z='#RowsetSchema'>
  <xsl:template match="/">
    <input type="hidden" name="selectedButton" value="" />
    <!-- Titre et corps -->
	<table width="100%" border="0" cellspacing="0" cellpadding="0" summary="Webpart VIDEO">
	  <tr>
		<td style="padding:10px">
		  <xsl:for-each select="xml/rs:data/z:row">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<td>
				  <br />
				  <span style="text-transform:uppercase;color:#4f4f4f;font-weight:bold">
					<xsl:value-of select="current()/@ows_Surtitre" />
				  </span>
				  <br />
				  <xsl:choose>
					<xsl:when test="normalize-space(Avanade:FormatLink(current()/@ows_Lien_x0020_vers_x0020_autre_x002)) != ''">
					  <a style="font-size:11px;font-weight:bold">
						  <xsl:attribute name="href">
							<xsl:value-of select="Avanade:FormatLink(current()/@ows_Lien_x0020_vers_x0020_autre_x002)" />
						  </xsl:attribute>
						<span style="color:#f21e8c">
						  <xsl:value-of select="current()/@ows_Title" />
						</span>
					  </a>
					</xsl:when>
					<xsl:when test="normalize-space(//BaseUrl) != ''">
					  <a style="font-size:11px;font-weight:bold">
						<xsl:attribute name="href">
						  <xsl:value-of select="//BaseUrl" />
						  <xsl:value-of select="current()/@ows_ID" />
						</xsl:attribute>
						<span style="color:#f21e8c">
						  <xsl:value-of select="current()/@ows_Title" />
						</span>
					  </a>
					</xsl:when>
					<xsl:otherwise>
					  <span style="font-size:11px;font-weight:bold;color:#f21e8c">
						<xsl:value-of select="current()/@ows_Title" />
					  </span>
					</xsl:otherwise>
				  </xsl:choose>
				  <span style="color:gray;font-size:8px;font-weight:bold">
					(<xsl:value-of select="Avanade:FormatDate(current()/@ows_Created)" />)
				  </span>
				  <br/>
				  <br/>
				  <div style="clear:both;vertical-align:top">
					<xsl:if test="normalize-space(translate(current()/@ows_Photo, ',', '')) != ''">
					  <div style="float:left;padding-right:10px">
						<a>
						  <xsl:if test="normalize-space(//BaseUrl) != ''">
							<xsl:attribute name="href">
							  <xsl:value-of select="//BaseUrl" />
							  <xsl:value-of select="current()/@ows_ID" />
							</xsl:attribute>
						  </xsl:if>
						  <img style="border:solid 1px #fce4ee;">
							<xsl:attribute name="src">
							  <xsl:value-of select="Avanade:FormatLink(current()/@ows_Photo)" />
							</xsl:attribute>
						  </img>
						</a>
					  </div>
					</xsl:if>
					  <div>
						<xsl:value-of select="current()/@ows_Body" />
					  </div>
				  </div>
				</td>
			  </tr>
			  <tr>
				<td style="height:1px;background-color:#fce4ee;"></td>
			  </tr>
			</table>
		  </xsl:for-each>
		</td>
	  </tr>
	  <xsl:if test="normalize-space(//NewFormURL) != ''">
		<tr>
		  <td class="ms-addnew">
			<![CDATA[<img alt="" src="_layouts/images/rect.gif" />&nbsp;<a class="ms-addnew" href="]]><xsl:value-of select="//NewFormURL" /><![CDATA[">Ajouter une nouvelle annonce</a>]]>
		  </td>
		</tr>
	  </xsl:if>
	</table>
  </xsl:template>
</xsl:stylesheet>